import Vue from "vue";
import VueRouter from "vue-router";
import Main from "../views/Main.vue"

Vue.use(VueRouter)

const routes = [
    { path: '/', redirect: '/login'},
    { path: '/login', component:() => import('../views/login.vue') },
    { path: '/Main', component:() => import('../views/Main.vue'),
    redirect: './home',
    children:[  
                {
                    path:'/home',
                    component:()=>import('../views/home.vue')
                },
                {
                    path:'/LunBo',
                    component:()=>import('../views/LunBo.vue')
                },
                {
                    path:'/Category',
                    component:()=>import('../views/Category.vue')
                }
            ]},
    // {
    //     path:'/Main',a
    //     name:'Main',
    //     component:()=>import('../views/Main'),
    //     children:[  
    //         {
    //             path:'/home',
    //             component:()=>import('../views/home.vue')
    //         },
    //         {
    //             path:'/com_change',
    //             component:()=>import('../views/com_change.vue')
    //         }
    //     ]
    // },
]

const router=new VueRouter({
    routes
})

export default router